#coding = utf-8
from fractions import Fraction

def gcd(x, y):
    while y:
        t = x % y
        x = y
        y = t
    return x

n = int(input('输入n值'))
a = []
b = []
c = []
d = ['0/1']
for i in range(n+1):
    a.append(i)
for i in a[2:]:
    for j in range(i):
        if j == 0:
            continue
        if gcd(i,j) == 1:
            c.append(Fraction(j,i))
b=sorted(c)
for k in b:
    d.append(str(k))
d.append('1/1')
print(d)